<template>
  <div class="app_p">
    <MyHeader></MyHeader>
    <MyGoods :goods="item" v-for="item in list" :key="item.id"></MyGoods>
    <MyFooter :list="list"></MyFooter>
  </div>
</template>

<script>
import MyHeader from "./components/MyHeader.vue"
import MyGoods from "./components/MyGoods.vue"
import MyFooter from "./components/MyFooter.vue"

export default {
 components:{
   MyHeader,
   MyGoods,
   MyFooter
 },

  data() {
    return {
      list:[]
    }
  },

async created(){
 this.list =  (await this.$axios.get('/api/cart')).data.list
 console.log( this.list);
},
  

  methods: {
    
  },
};
</script>

<style lang="css" scoped>
.app_p{
  padding-top: 45px;
  padding-bottom: 55px;
}
</style>
